<div class="box">
    <div class="box_left">
        <div class="box_right"><span>Tin tức nổi bật</span></div>
    </div>
</div>

<div class="box_1">
    <ul id="news_detail">
<?php
if(isset ($articles) == TRUE && count($articles) > 0) :
    foreach($articles as $obj) :
        preg_match('/<\s*img [^\>]*src\s*=\s*(["\'])(.*?)\1/', $obj->content, $matches);
        if (is_array($matches) && !empty($matches))
        {
           $image = $matches[2];
        }
        else
        {
           $image = Url::site('assets/client/images/no-image.jpg');
        }
?>
        <li>
            <a href="<?php echo Url::site('article/detail/' . $obj->id) ?>"><img src="<?php echo $image ?>" alt=""></a>
            <h2><a href="<?php echo Url::site('article/detail/' . $obj->id) ?>"><?php echo $obj->title ?></a></h2>
        </li>
<?php
    endforeach;
endif;
?>
    </ul>
</div>